<nz-card [nzBodyStyle]="{'padding':'0'}" [nzTitle]="extraTemplate">
    <nz-table #basicTable [nzData]="dataSet" nzBordered="true" [nzFrontPagination]="false" [nzTotal]="page.total"
        [nzPageIndex]="page.page" [nzPageSize]="page.per_page" [nzShowSizeChanger]="true"
        (nzQueryParams)="onQueryParamsChange($event)" [nzSize]="'small'">
        <thead>
            <tr>
                <th nzWidth="100px">项目</th>
                <th nzWidth="100px">进度</th>
                <th nzWidth="200px">标题</th>
                <th>详情</th>
                <th nzWidth="100px">评论</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let data of basicTable.data">
                <td>{{data.program.name}}</td>
                <td>{{data.issue_state}}</td>
                <td>{{data.title}}</td>
                <td><a href="{{data.html_url}}" target="_blank">{{data.body}}</a></td>
                <td><a href="{{data.comments_url}}" target="_blank">{{data.comments}}</a></td>
            </tr>
        </tbody>
    </nz-table>
</nz-card>


<ng-template #extraTemplate>
    <div nz-row [nzGutter]="4">
        <div nz-col>
            项目:
            <nz-select style="width: 100px;" [(ngModel)]="page.q" (ngModelChange)="loadData()" nzAllowClear>
                <nz-option nzValue="宁波种业" nzLabel="宁波种业"></nz-option>
                <nz-option nzValue="宁波微萌" nzLabel="宁波微萌"></nz-option>
                <nz-option nzValue="技术变现" nzLabel="技术变现"></nz-option>
            </nz-select>
            <!-- <nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">
                <input type="text" (keyup.enter)="loadData()" [(ngModel)]="page.q" nz-input placeholder="项目名称" />
            </nz-input-group> -->
        </div>
        <div nz-col>
            <nz-select [(ngModel)]="page.state" (ngModelChange)="loadData()">
                <nz-option nzValue="open" nzLabel="open(开启的)"></nz-option>
                <nz-option nzValue="progressing" nzLabel="progressing(进行中)"></nz-option>
                <nz-option nzValue="closed" nzLabel="closed(关闭的)"></nz-option>
                <nz-option nzValue="rejected" nzLabel="rejected(拒绝的)"></nz-option>
            </nz-select>
        </div>
        <div nz-col>
            <button nz-button nzType="default" (click)="newIssue()">
                <i nz-icon nzType="plus" nzTheme="outline"></i>
                new issue</button>
        </div>
    </div>
</ng-template>
<ng-template #suffixIconButton>
    <button (click)="loadData()" nz-button nzType="primary" nzSearch><i nz-icon nzType="search"></i></button>
</ng-template>